<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
    <head>
        <th:block th:include="include::header('区域设置')" />
    </head>
    <body class="febs-container" id="febs-baseArea" >
        <div class="febs-body layui-fluid" lay-title="区域设置">
            <div class="febs-body-search">
                <form class="layui-form layui-table-form" lay-filter="baseArea-table-form" id="baseArea-table-form">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-form-item">
                                <div class="layui-inline" id="baseArea-tenant" th:classappend="${hasHeadCompanyRole } ? '' : 'febs-hide'">
                                    <label class="layui-form-label layui-form-label-sm">公司名称</label>
                                    <div class="layui-input-inline" style="width: 280px;" >
                                        <select name="tenantId" id="tenantId" lay-search="" >
                                            <option th:each="item:${tenantList }"
                                                    th:value="${item.tenantId}" th:text="${item.tenantName}"
                                                    th:selected="${tenantId ==item.tenantId}">
                                        </select>
                                    </div>
                                </div>

                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">区域名称</label>
                                    <div class="layui-input-inline" style="width:190px;">
                                        <input type="text" name="areaName" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">排班日期</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="schedulingDate" id="febs-form-group-date" lay-verify="date"
                                               class="layui-input"  >
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">状态</label>
                                    <div class="layui-input-inline" style="width:190px;">
                                        <select name="status" id="status">
                                            <option value="1">启用</option>
                                            <option value="0">禁用</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <div id="query" class="layui-btn">
                                        <em class="layui-icon">&#xe615;</em> 查询
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
             </div>
            <div class="febs-table-full">
                <table lay-filter="baseAreaTable" lay-data="{id: 'baseAreaTable'}"></table>
            </div>
        </div>
        <th:block th:include="include::foot" />
        <script type="text/html" id="baseArea-toolbar">
            <div lay-event="add" class="layui-btn layui-btn-sm " shiro:hasPermission="baseArea:add">
                <em class="layui-icon">&#xe654;</em> 新增区域
            </div>
<!--            <div lay-event="addWork" class="layui-btn layui-btn-sm " shiro:hasPermission="baseArea:add">-->
<!--                <em class="layui-icon">&#xe654;</em> 新增排班-->
<!--            </div>-->
<!--            <div lay-event="scheduleView" class="layui-btn layui-btn-sm " shiro:hasPermission="baseArea:view">-->
<!--                <em class="layui-icon">&#xe7b7;</em> 排班总览-->
<!--            </div>-->
<!--            <div lay-event="scheduleImport" class="layui-btn layui-btn-sm " shiro:hasPermission="baseArea:export">-->
<!--                <em class="layui-icon">&#xe7aa;</em> 排班导入-->
<!--            </div>-->
<!--            <div lay-event="scheduleExport" class="layui-btn layui-btn-sm " shiro:hasPermission="baseArea:export">-->
<!--                <em class="layui-icon">&#xe82a;</em> 导入模板下载-->
<!--            </div>-->
        </script>
        <script type="text/html" id="are-option">
            <span shiro:lacksPermission="baseArea:edit,baseArea:delete">
                <span class="layui-badge-dot febs-bg-orange"></span> 无权限
            </span>
            <button type="button" class="layui-btn layui-btn-xs layui-btn-primary layui-border-orange" lay-event="edit" shiro:hasPermission="baseArea:edit">
                <i class="layui-icon layui-icon-edit"></i>
                编辑
            </button>
<!--            <button type="button"  class="layui-btn layui-btn-xs layui-btn-primary layui-border-orange" lay-event="editWork" shiro:hasPermission="baseArea:edit">-->
<!--                <i class="layui-icon febs-edit-area febs-blue"></i>-->
<!--                编辑排班-->
<!--            </button>-->
            <button type="button"  class="layui-btn layui-btn-xs layui-btn-primary layui-border-red" lay-event="del" shiro:hasPermission="baseArea:delete">
                <i class="layui-icon layui-icon-delete"></i>
                删除
            </button>
        </script>
        <script type="text/html" id="status-bar">
            <input type="checkbox" name="areaStatus" value="{{d.status}}" lay-skin="switch" lay-text="启用|禁用"
                   lay-filter="areaStatus" lay-event="statusEvent"  {{ d.status == '1' ? 'checked' : '' }} />
        </script>
        <script data-th-inline="javascript">
            currentTenantId = [[${tenantId}]],
            hasHeadCompanyRole = [[${hasHeadCompanyRole}]];
        </script>
        <script th:src="@{/febs/js/base/baseArea/baseAreaList.js(v=1)}"></script>
    </body>
</html>
